﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Customers.aspx.cs" Inherits="TireService.Mobile.Customers" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <h1>Kunder</h1>
    <table border="0" cellpadding="3" cellspacing="3" width="100%">
        <tr>
            <td valign="top" style="width:120px">
                <dx:ASPxRadioButtonList ID="rbSearchFilter" runat="server" Height="85px" Width="120px">
                    <Items>
                        <dx:ListEditItem Text="Kundenr" Value="0" Selected="true" />
                        <dx:ListEditItem Text="Reg.nr." Value="1" />
                        <dx:ListEditItem Text="Navn" Value="2" />
                    </Items>
                </dx:ASPxRadioButtonList>
            </td>
            <td valign="top" style="width:100%">
                <dx:ASPxButton ID="btnSearchCustomer" runat="server" Text="Søg" Width="100%" 
                    Height="85px" onclick="btnSearchCustomer_Click">
                </dx:ASPxButton>
            </td>
        </tr>
        <tr>
            <td colspan="2"></td>
        </tr>
        <tr>
            <td colspan="2">
                <dx:ASPxTextBox ID="txtSearchString" NullText="Indtast søgning" runat="server" 
                    Width="100%" Height="50px">
                </dx:ASPxTextBox>    
            </td>
        </tr>
    </table>
    <br />
    <dx:ASPxGridView ID="gvCustomers" runat="server" ClientInstanceName="gvCustomers" Caption="Kunder" 
        KeyFieldName="CustomerId" Width="100%" AutoGenerateColumns="False" EnableCallBacks="True">
        <SettingsLoadingPanel Text="Henter&amp;hellip;" />
        <Settings ShowHeaderFilterButton="false" ShowGroupPanel="false" ShowFilterRow="false" ShowPreview="true" />
        <SettingsPager AlwaysShowPager="false" PageSize="25" Position="TopAndBottom">
            <Summary 
                AllPagesText="Sider: {0} - {1} ({2} kunder)" 
                Text="Side {0} af {1} ({2} kunder)" />
        </SettingsPager>
        <SettingsBehavior ConfirmDelete="True" AllowGroup="false" AllowDragDrop="false" />
        <Templates>
            <PreviewRow>
                <b><asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label></b><br />
                <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("Address") %>'></asp:Label>, <asp:Label ID="lblZipCode" runat="server" Text='<%# Eval("ZipCode") %>'></asp:Label> <asp:Label ID="lblCity" runat="server" Text='<%# Eval("City") %>'></asp:Label><br />
                <asp:Label ID="lblAddress2" runat="server" Text='<%# Eval("SecondaryAddress") %>'></asp:Label>, <asp:Label ID="lblZipCode2" runat="server" Text='<%# Eval("SecondaryZipCode") %>'></asp:Label> <asp:Label ID="lblCity2" runat="server" Text='<%# Eval("SecondaryCity") %>'></asp:Label><br />
                Telefon: <asp:Label ID="lblPhone1" runat="server" Text='<%# Eval("Phone1") %>'></asp:Label> - <asp:Label ID="lblPhone2" runat="server" Text='<%# Eval("Phone2") %>'></asp:Label><br />
                Email: <asp:Label ID="lblEmail" runat="server" Text='<%# Eval("Email") %>'></asp:Label><br />
                <hr />
            </PreviewRow>
        </Templates>
        
    </dx:ASPxGridView>

</asp:Content>
